import React, { Component, useState } from 'react'

export default function HOC_Component(Comp) {
    return (
        class HOC extends Component {
            SetScroll = (value) => {
                console.log(value)
                var a = [];
                a.push(a);
                console.log(a, 1)
                window.sessionStorage.setItem("scroll", JSON.stringify(value))
            }
            GetScroll = () => {
                var myTop = window.sessionStorage.getItem("scroll")
                return myTop
            }
            render() {
                return (
                    <Comp SetScroll={this.SetScroll} GetScroll={this.GetScroll}></Comp>
                )
            }

        }
    )
}

